﻿<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" class="csstransforms csstransforms3d csstransitions">
<head>
	<meta charset="utf-8" />
	<meta http-equiv="x-ua-compatible" content="ie=edge" />
	<meta http-equiv="cache-control" content="no-cache, must-revalidate" /> 
	<meta http-equiv="expires" content="0" />
	<meta http-equiv="pragma" content="no-cache" />
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
	<meta name="author" content="chanlong" />
	<meta name="keywords" content="蜜娃娃, 早教, 缤够, 云服务" />
	<meta name="description" content="蜜娃娃云服务，专业提供早教领域，企业及机构，运营管理类，互联网产品" />
	<title>缤够旗下 蜜娃娃品牌 早教运营管理 云服务</title>
	
	<link href="/miwawa/favicon.ico" rel="icon" type="image/x-icon" />
  <link href="/miwawa/favicon.ico" rel="shortcut icon" type="image/x-icon" />
  
	<script src="/miwawa/resources/lib/miwawa/1.0.2/js/core/css.js"></script>
</head>

<body>
	<!-- header -->
	<header class="navbar navbar-fixed-top">
		<div class="navbar-inner">
			<div class="navbar-container">
				<div class="navbar-header pull-left">
					<a href="javascript:void(0);" class="navbar-brand">
						<i class="typcn typcn-group-outline icon-logo"></i>
						<span class="text-logo">蜜娃娃云服务</span>
					</a>
				</div>
				<div class="sidebar-collapse">
					<i class="collapse-icon fa fa-bars"></i>
				</div>
				<div class="navbar-header pull-right">
					<div class="navbar-account">
						<ul class="account-area">
							<li>
								<a class="dropdown-toggle" data-toggle="dropdown" title="通知" aria-haspopup="true" aria-expanded="false" href="#"> 
									<i class="icon fa fa-bell icon-animated-bell"></i>
								</a>
								<ul class="pull-right dropdown-menu dropdown-arrow dropdown-notifications">
									<li class="dropdown-footer">
										<span> 更多 </span>
									</li>
								</ul>
							</li>
							<li>
								<a href="download/机构实施步骤.docx" class="mega-link">
					    		<span class="mega-icon"><i class="icon fa fa-file-word-o fa-lg"></i></span> 
					      </a>
							</li>
							<li>
								<a href="download/蜜娃娃SaaS云-使用手册.docx" class="mega-link">
					    		<span class="mega-icon"><i class="icon fa fa-question fa-lg"></i></span> 
					      </a>
							</li>
						</ul>
					</div>
				</div>
			</div>
		</div>
	</header>
	<!--/header -->
	
	<div class="main-container container-fluid">
		<div class="page-container">
			<!-- sidemenu -->
			<aside class="page-sidebar">
				<div class="sidebar-header-wrapper">
        	<div class="sidebar-header-profile">
 						<a class="dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" href="#"> 
	            <span class="profile-image"><img class="img-circle" src="/miwawa/resources/photos/user/default.png" /></span>               
	            <span class="profile-info">
	            	<span class="font-gray"  id="userdept" th:text="${data.result.user.center}"></span><br/>
	            	<span class="font-white" id="username" th:text="${data.result.user.name}"></span>
	            	<span class="font-white"><i class="fa fa-caret-down fa-fw"></i></span> 
	            </span>
	        	</a>
						<ul class="pull-right dropdown-menu dropdown-arrow dropdown-profile">
							<li>
								<a href="#" data-toggle="modal" data-target="#password-modal"> 
									<span class="profile-icon"><i class="fa fa-cogs"></i></span> 
									<span class="profile-text">修改密码</span>
								</a>
							</li>
							<li>
								<a href="login.html"> 
									<span class="profile-icon"><i class="fa fa-sign-out"></i></span> 
									<span class="profile-text">注销登录</span>
								</a>
							</li>
							<li class="line"></li>
							<li>
								<a href="download/蜜娃娃SaaS云-系统管理手册.docx" target="_blank"> 
									<span class="profile-icon"><i class="fa fa-question-circle"></i></span> 
									<span class="profile-text">帮助说明</span>
								</a>
							</li>
							<li>
								<a href="#" onclick="handlerHelps()"> 
									<span class="profile-icon"><i class="fa fa-user-md"></i></span> 
									<span class="profile-text">问题报告</span>
								</a>
							</li>
						</ul>
					</div>
        </div>
				
				<ul class="nav sidebar-menu" th:if="${data.result.user.type eq 'users'}">
					<li th:if="${#maps.containsKey(data.result.user.auths, 'miwawa.portal')}">
						<a href="javascript:;" class="menu-dropdown"> 
							<i class="menu-icon fa fa-dashboard"></i> 
							<span class="menu-text"> 我的工作 </span> 
							<i class="menu-expand"></i>
						</a>
						<ul class="submenu">
							<li th:if="${#maps.containsKey(data.result.user.auths, 'miwawa.portal.adviser')}">
								<a href="javascript:;" data-toggle="ajaxload" data-url="/miwawa/content/portal/adviser.html" data-target=".page-body"> 
									<span class="menu-text">销售台账</span>
								</a>
							</li>
							<li th:if="${#maps.containsKey(data.result.user.auths, 'miwawa.portal.teacher')}">
								<a href="javascript:;" data-toggle="ajaxload" data-url="/miwawa/content/portal/teacher.html" data-target=".page-body"> 
									<span class="menu-text">老师台账</span>
								</a>
							</li>
							<li th:if="${#maps.containsKey(data.result.user.auths, 'miwawa.portal.leaders')}">
								<a href="javascript:;" data-toggle="ajaxload" data-url="/miwawa/content/portal/leaders.html" data-target=".page-body"> 
									<span class="menu-text">决策分析</span>
								</a>
							</li>
						</ul>
					</li>
					<li th:if="${#maps.containsKey(data.result.user.auths, 'miwawa.report')}">
						<a href="javascript:;" class="menu-dropdown"> 
							<i class="menu-icon fa fa-area-chart"></i> 
							<span class="menu-text"> 报表管理 </span> 
							<i class="menu-expand"></i>
						</a>
						<ul class="submenu">
							<li th:if="${#maps.containsKey(data.result.user.auths, 'miwawa.report.salesanalysis')}">
								<a href="javascript:;" data-toggle="ajaxload" data-url="/miwawa/content/report/esm/a1.html" data-target=".page-body"> 
									<span class="menu-text">销售分析表</span>
								</a>
							</li>
							<li th:if="${#maps.containsKey(data.result.user.auths, 'miwawa.report.marketanalysis')}">
								<a href="javascript:;" data-toggle="ajaxload" data-url="/miwawa/content/report/esm/a2.html" data-target=".page-body"> 
									<span class="menu-text">市场分析表</span>
								</a>
							</li>
							<li>
								<a href="javascript:;" data-toggle="ajaxload" data-url="/miwawa/content/report/eam/a3.html" data-target=".page-body"> 
									<span class="menu-text">班级续费统计表</span>
								</a>
							</li>
							<li>
								<a href="javascript:;" data-toggle="ajaxload" data-url="/miwawa/content/report/eam/a4.html" data-target=".page-body"> 
									<span class="menu-text">班级到课统计表</span>
								</a>
							</li>
							<li>
								<a href="javascript:;" data-toggle="ajaxload" data-url="/miwawa/content/report/eam/a5.html" data-target=".page-body"> 
									<span class="menu-text">耗课统计表</span>
								</a>
							</li>
							<li>
								<a href="javascript:;" data-toggle="ajaxload" data-url="/miwawa/content/report/eam/a6.html" data-target=".page-body"> 
									<span class="menu-text">耗课明细表</span>
								</a>
							</li>
							<li>
								<a href="javascript:;" data-toggle="ajaxload" data-url="/miwawa/content/report/eam/a8.html" data-target=".page-body"> 
									<span class="menu-text">学员所在班级表</span>
								</a>
							</li>
							<li>
								<a href="javascript:;" data-toggle="ajaxload" data-url="/miwawa/content/report/esm/a7.html" data-target=".page-body"> 
									<span class="menu-text">试听明细表</span>
								</a>
							</li>
							<li th:if="${#maps.containsKey(data.result.user.auths, 'miwawa.report.yearcount')}">
								<a href="javascript:;" data-toggle="ajaxload" data-url="/miwawa/content/report/esm/n1.html" data-target=".page-body"> 
									<span class="menu-text">年表</span>
								</a>
							</li>
						</ul>
					</li>
					
					<li th:if="${#maps.containsKey(data.result.user.auths, 'miwawa.esm')}">
						<a href="javascript:;" class="menu-dropdown"> 
							<i class="menu-icon fa fa-line-chart"></i> 
							<span class="menu-text"> 销售管理 </span> 
							<i class="menu-expand"></i>
						</a>
						<ul class="submenu">
							<li th:if="${#maps.containsKey(data.result.user.auths, 'miwawa.esm.customer')}">
								<a href="javascript:;" data-toggle="ajaxload" data-url="/miwawa/esm/customer/list" data-auths="miwawa.esm.customer" data-target=".page-body"> 
									<span class="menu-text">客户管理</span>
								</a>
							</li>
							<li th:if="${#maps.containsKey(data.result.user.auths, 'miwawa.esm.contract')}">
								<a href="javascript:;" data-toggle="ajaxload" data-url="/miwawa/esm/contract/list" data-auths="miwawa.esm.contract" data-target=".page-body"> 
									<span class="menu-text">合同管理</span>
								</a>
							</li>
							<li th:if="${#maps.containsKey(data.result.user.auths, 'miwawa.esm.avtarget')}"> 
								<a href="javascript:;" data-toggle="ajaxload" data-url="/miwawa/content/esm/adviser/business.html" data-target=".page-body"> 
									<span class="menu-text">业绩管理</span>
								</a>
							</li>
							<li th:if="${#maps.containsKey(data.result.user.auths, 'miwawa.esm.selected')}"> 
								<a href="javascript:;" data-toggle="ajaxload" data-url="/miwawa/content/esm/select/list.html" data-target=".page-body"> 
									<span class="menu-text">综合查询</span>
								</a>
							</li>
						</ul>
					</li>
					
					<li th:if="${#maps.containsKey(data.result.user.auths, 'miwawa.eam')}">
						<a href="javascript:;" class="menu-dropdown"> 
							<i class="menu-icon fa fa-list-alt"></i> 
							<span class="menu-text"> 教务管理 </span> 
							<i class="menu-expand"></i>
						</a>
						<ul class="submenu">
							<li th:if="${#maps.containsKey(data.result.user.auths, 'miwawa.eam.student')}">
								<a href="javascript:;" data-toggle="ajaxload" data-url="/miwawa/content/eam/student/list.html" data-target=".page-body"> 
									<span class="menu-text">学员管理</span>
								</a>
							</li>
							<li th:if="${#maps.containsKey(data.result.user.auths, 'miwawa.eam.classes')}">
								<a href="javascript:;" data-toggle="ajaxload" data-url="/miwawa/eam/classes/list" data-auths="miwawa.eam.classes" data-target=".page-body"> 
									<span class="menu-text">班级管理</span>
								</a>
							</li>
							<li th:if="${#maps.containsKey(data.result.user.auths, 'miwawa.eam.lesson')}">
								<a href="javascript:;" data-toggle="ajaxload" data-url="/miwawa/content/eam/lesson/list.html" data-target=".page-body"> 
									<span class="menu-text">课程管理</span>
								</a>
							</li>
							<li th:if="${#maps.containsKey(data.result.user.auths, 'miwawa.eam.room')}">
								<a href="javascript:;" data-toggle="ajaxload" data-url="/miwawa/content/eam/room/list.html" data-target=".page-body"> 
									<span class="menu-text">教室管理</span>
								</a>
							</li>
						</ul>
					</li>
					
				</ul>
				
				<ul class="nav sidebar-menu" th:if="${data.result.user.type eq 'super'}">
					<li>
						<a href="javascript:;" class="menu-dropdown"> 
							<i class="menu-icon fa fa-list-alt"></i> 
							<span class="menu-text"> 平台管理 </span> 
							<i class="menu-expand"></i>
						</a>
						<ul class="submenu">
							<li>
								<a href="javascript:;" data-toggle="ajaxload" data-url="/miwawa/content/system/center/list.html" data-target=".page-body"> 
									<span class="menu-text">机构注册</span>
								</a>
							</li>
							<li>
								<a href="javascript:;" data-toggle="ajaxload" data-url="/miwawa/content/system/assets/list.html" data-target=".page-body"> 
									<span class="menu-text">资源设置</span>
								</a>
							</li>
							<li>
								<a href="javascript:;" data-toggle="ajaxload" data-url="/miwawa/content/system/groups/list.html" data-target=".page-body"> 
									<span class="menu-text">角色设置</span>
								</a>
							</li>
							<li>
								<a href="javascript:;" data-toggle="ajaxload" data-url="/miwawa/content/system/result/list.html" data-target=".page-body"> 
									<span class="menu-text">数据统计</span>
								</a>
							</li>
							<li>
								<a href="javascript:;" data-toggle="ajaxload" data-url="/miwawa/content/system/callers/list.html" data-target=".page-body"> 
									<span class="menu-text">话费充值</span>
								</a>
							</li>
						</ul>
					</li>
					<li>
						<a href="javascript:;" class="menu-dropdown"> 
							<i class="menu-icon fa fa-list-alt"></i> 
							<span class="menu-text"> 系统设置 </span> 
							<i class="menu-expand"></i>
						</a>
						<ul class="submenu">
							<li>
								<a href="javascript:;" data-toggle="ajaxload" data-url="/miwawa/content/system/notify/list.html" data-target=".page-body"> 
									<span class="menu-text">消息通知</span>
								</a>
							</li>
							<li>
								<a href="javascript:;" data-toggle="ajaxload" data-url="/miwawa/content/system/codec/list.html" data-target=".page-body"> 
									<span class="menu-text">数据字典</span>
								</a>
							</li>
							<li>
								<a href="javascript:;" data-toggle="ajaxload" data-url="/miwawa/content/system/easemob/list.html" data-target=".page-body"> 
									<span class="menu-text">环信账号</span>
								</a>
							</li>
							<li>
								<a href="javascript:;" data-toggle="ajaxload" data-url="/miwawa/content/system/banner/list.html" data-target=".page-body"> 
									<span class="menu-text">广告发布</span>
								</a>
							</li>
						</ul>
					</li>
					<li>
						<a href="javascript:;" class="menu-dropdown"> 
							<i class="menu-icon fa fa-list-alt"></i> 
							<span class="menu-text"> 日志管理 </span> 
							<i class="menu-expand"></i>
						</a>
						<ul class="submenu">
							<li>
								<a href="javascript:;" data-toggle="ajaxload" data-url="/miwawa/content/system/center/list.html" data-target=".page-body"> 
									<span class="menu-text">登录日志</span>
								</a>
							</li>
							<li>
								<a href="javascript:;" data-toggle="ajaxload" data-url="/miwawa/content/system/center/list.html" data-target=".page-body"> 
									<span class="menu-text">操作日志</span>
								</a>
							</li>
							<li>
								<a href="javascript:;" data-toggle="ajaxload" data-url="/miwawa/content/system/center/list.html" data-target=".page-body"> 
									<span class="menu-text">系统日志</span>
								</a>
							</li>
						</ul>
					</li>
				</ul>
				
				<ul class="nav sidebar-menu" th:if="${data.result.user.type eq 'center'}">
					<li>
						<a href="javascript:;" class="menu-dropdown"> 
							<i class="menu-icon fa fa-list-alt"></i> 
							<span class="menu-text"> 系统管理 </span> 
							<i class="menu-expand"></i>
						</a>
						<ul class="submenu">
							<li>
								<a href="javascript:;" data-toggle="ajaxload" data-url="/miwawa/content/system/admin/shops/list.html" data-target=".page-body"> 
									<span class="menu-text">门店管理</span>
								</a>
							</li>
							<li>
								<a href="javascript:;" data-toggle="ajaxload" data-url="/miwawa/content/system/admin/users/list.html" data-target=".page-body"> 
									<span class="menu-text">雇员管理</span>
								</a>
							</li>
							<li>
								<a href="javascript:;" data-toggle="ajaxload" data-url="/miwawa/content/system/admin/notify/list.html" data-target=".page-body"> 
									<span class="menu-text">通知管理</span>
								</a>
							</li>
						</ul>
					</li>
					<li>
						<a href="javascript:;" class="menu-dropdown"> 
							<i class="menu-icon fa fa-list-alt"></i> 
							<span class="menu-text"> 内容管理 </span> 
							<i class="menu-expand"></i>
						</a>
						<ul class="submenu">
							<li>
								<a href="javascript:;" data-toggle="ajaxload" data-url="/miwawa/content/system/content/article/list.html" data-target=".page-body"> 
									<span class="menu-text">文章管理</span>
								</a>
							</li>
						</ul>
					</li>
				</ul>
				
				<ul class="sidebar-logout">
					<li>
						<a href="login.html"> 
							<i class="menu-icon fa fa-sign-out"></i>
							<span class="menu-text">退出登录</span>
						</a>
					</li>
				</ul>
			</aside>
			
			<!-- contents -->
			<div class="page-content">
				<div class="page-breadcrumbs">
					<ul class="breadcrumb">
						<li><i class="fa fa-home"></i> <a href="index.html">首页</a></li>
						<li class="active">工作台</li>
					</ul>
					<div class="header-buttons">
						<a class="sidebar-toggler" href="javascript:;">
							<i class="fa fa-arrows-h"></i>
						</a>
						<a class="refresh" id="refresh-toggler" href="javascript:;"> 
							<i class="glyphicon glyphicon-refresh"></i>
						</a>
						<a class="fullscreen" id="fullscreen-toggler" href="javascript:;"> 
							<i class="glyphicon glyphicon-fullscreen"></i>
						</a>
					</div>
				</div>
				<div class="page-body"> </div>
			</div>
		</div>
	</div>
	
	<div class="modal modal-middle fade" id="password-modal" tabindex="-1" role="dialog" aria-labelledby="password-modal-label" data-backdrop="static">
	  <div class="modal-dialog" role="document">
	    <div class="modal-content">
	      <div class="modal-header">
	        <button type="button" class="close" data-dismiss="modal" aria-label="关闭"><span aria-hidden="true">&times;</span></button>
	        <h4 class="modal-title" id="password-modal-label">修改密码</h4>
	      </div>
	      <div class="modal-body">
	        <form class="form-horizontal form-editor form-editor-password" method="post">
	        	<div class="row">
							<div class="col-sm-12">
								<div class="form-group">
									<label class="col-sm-2 control-label required" for="orig_password">原密码</label>
									<div class="col-sm-10">
										<input name="orig_password" id="orig_password" type="password" class="form-control" required="required"/>
									</div>
								</div>
							</div>
							<div class="col-sm-12">
								<div class="form-group">
									<label class="col-sm-2 control-label required" for="dest_password">新密码</label>
									<div class="col-sm-10">
										<input name="dest_password" id="dest_password" type="password" class="form-control" required="required"
													 data-bv-stringlength="true" 
													 data-bv-stringlength-min="6" 
													 data-bv-stringlength-max="30"/>
									</div>
								</div>
							</div>
							<div class="col-sm-12">
								<div class="form-group">
									<label class="col-sm-2 control-label required" for="chks_password">确认密码</label>
									<div class="col-sm-10">
										<input name="chks_password" id="chks_password" type="password" class="form-control" required="required" 
													 data-bv-stringlength="true" 
													 data-bv-stringlength-min="6" 
													 data-bv-stringlength-max="30"
													 data-bv-identical="true" 
													 data-bv-identical-field="dest_password"/>
									</div>
								</div>
							</div>
						</div>
	        </form>
	      </div>
	      <div class="modal-footer">
	        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
	        <button type="button" class="btn btn-primary" onclick="handlerPassword()">确认</button>
	      </div>
	    </div>
	  </div>
	</div>
	
	<!-- PAGE MODAL END ================================================= -->
	<!-- 公用对话框 -->
	<div class="modal modal-middle fade" id="common-modal" tabindex="-1" role="dialog" aria-labelledby="common-modal-label" data-backdrop="static">
	  <div class="modal-dialog modal-lg" role="document">
	    <div class="modal-content"></div>
	  </div>
	</div>
	<div class="modal modal-middle fade" id="extension-modal" tabindex="-1" role="dialog" aria-labelledby="extension-modal-label" data-backdrop="static">
	  <div class="modal-dialog modal-lg" role="document">
	    <div class="modal-content"></div>
	  </div>
	</div>
	<!-- PAGE MODAL END ================================================= -->
	
	<!-- Javascript ===================================================== -->
	<script src="/miwawa/resources/lib/miwawa/1.0.2/js/core/requirejs/require.js" data-main="/miwawa/resources/lib/miwawa/1.0.2/js/core/module/app/index"></script>
	
	<script th:inline="javascript">
	/*<![CDATA[*/
		// 设置全局用户信息变量
		var user = /*[[${data.result.user}]]*/;
		window["dbname"] = user.dbname;
		window["mobile"] = user.mobile;
		window["userid"] = user.id;
		window["username"] = user.name;
		window["centerid"] = user.centerid;
		
		function handlerHelps(){
			jQuery.message.warning("此功能暂未开通");
		}
		
		// 密码修改确认
		function handlerPassword(){
			var url = (user.name != "系统管理员" && user.name != "超级管理员")?"/miwawa/default/users/password":"/miwawa/default/admin/password";
			var data = (user.name != "系统管理员" && user.name != "超级管理员")?{"users.id": userid, "users.password": jQuery("#dest_password").val()}:{"id": userid, "password": jQuery("#dest_password").val()};
			jQuery(".form-editor-password").ajaxSubmit({
				url: url,
				data: data,
				dataType: "json",
				resetForm: true,
				beforeSubmit: function(arr, $form, options) {
					return jQuery(".form-editor-password").bootstrapValidator({
						fields: {"orig_password": {
          		validators: {callback: {
          		message: '原密码有误',
            	callback: function(value, validator) {
            		var password = jQuery("#orig_password").val();
                	return password == "" ? true : checkPassword(password);
              	}
            	}
          	}}}
					}).data('bootstrapValidator').validate().isValid();
				},
				success: function(data){
					if(data && data.success && typeof data.success == "string"){
						jQuery("#password-modal").modal("hide");
						jQuery.message.success(data.success);
					}
				}
			});	
		}
		
		// 检查原密码
		function checkPassword(password){
			var bools = false;
			var url = (user.name != "系统管理员" && user.name != "超级管理员")?"/miwawa/default/user/check/password":"/miwawa/default/admin/check/password";
			var data = (user.name != "系统管理员" && user.name != "超级管理员")?{"mobile": mobile, "password": password}:{"account": user.account, "password": password};
   		jQuery.ajaxsend({
	   		url: url,
	   		async: false,
	   		data: data
     	}).done(function(data){
	   		if(typeof data.success == "object"){
	   			bools = true;
	   		}
     	});
     	return bools;
		}
	/*]]>*/
	</script>
	
</body>
</html>
